import { defHttp } from '@/utils/http/axios';
import { listParams, detailParams, createGroupChatParams } from './model/chatGroupModel';
import { BasicListResult, BasicDataResult } from '../model/baseModel';

import { ErrorMessageMode } from '#/axios';

enum Api {
  //Login = '/login',
  getLevelSelects = '/hl/common/getLevelSelects',
  getCategorySelects = '/hl/common/getCategorySelects',
  getConfig = '/hl/common/getConfig',
}

/**
 * @description: user login api
 */
export function getLevelSelectsApi(params: null, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<BasicDataResult>(
    {
      url: Api.getLevelSelects,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

export function getCategorySelectsApi(params:  null, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<BasicDataResult>(
    {
      url: Api.getCategorySelects,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

export function getConfigApi(params:  null, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<BasicDataResult>(
    {
      url: Api.getConfig,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}
